The variable-length switching technology is a packet switching technology that directly processes a variable-length packet in a structure for switching data instead of segmenting the variable-length packet into cells for transmission. The variable-length switching technology is characterized in that on data channels in the structure for switching data, when an input port begins to switch a packet to an output port, a data channel from the input port to the output port is connected and is not released until the whole variable-length packet is transferred to the output port. To improve the efficiency of variable-length switching and overcome the defects brought about by packet segmentation and reassembly, generally, the packet is not really physically segmented when the variable-length packet arrives at the input port. Instead, the packet is logically segmented into fixed-length cells and the fixed-length cells are transmitted back to back. In this way, the packet remains complete during the transmission and when being received upon arriving at the output port, thereby avoiding the operation of reassembling the cells.
The implementation of the variable-length switching technology requires a reasonable structure for switching data and a reasonable method for switching data. Common structures for switching data in the prior art are listed below.
I. Arbiter Crossbar (ArbiterXB) Switch Structure (a Buffered Arbiter Crossbar Switch Structure)
FIG. 1 shows an N×N switch structure in which both the number of input ports and the number of output ports are N. The ArbiterXB adopts a space division structure and uses a centralized arbiter to determine a connection state of each cross-point and determine an output port data channel to which each input port data channel in an switched fabric should be connected, so as to implement the function of transferring data from an ingress of the switched fabric to an egress of the switched fabric. The problem of the architecture lies in that, the switch capacity is limited by, the complexity of the centralized arbiter. The centralized arbitration needs to determine the connection state of each cross-point according to sending requests of all the input ports and sending states of all the output ports, and the computational complexity is in direct proportion to the square of the number of the ports. When a huge number of ports need to be supported, such a centralized arbiter is hard to implement.
II. Combined Input and Crossbar Queued (CICQ) Switch Structure (Also Referred to as a Buffered Crossbar Switch Structure)
FIG. 2 shows an N×N switch structure in which both the number of input ports and the number of output ports are N. The CICQ switch structure (buffered crossbar) has one First-In-First-Out (FIFO) buffer at each cross-point. In total N2 (a square of N, where N is a natural number greater than or equal to 2, the same below) FIFOs exist. A centralized arbiter is not required, and each output port uses a simple output port scheduler to schedule N FIFO output port buffers. Each FIFO output port buffer sends back pressure information to a corresponding input port according to a queue depth, and each input port may decide whether to send data to the FIFO output port buffer according to the back pressure information.
The problem of the structure for switching data lies in that, although the defect of the centralized arbiter is overcome, in total N2 buffers are required for implementing the N×N switch structure since each cross-point of the CICQ has one buffer. In case of a large number of input ports and output ports, the demands for on-chip Random Access Memory (RAM) capacity resources increase sharply, so that the implementation cost is too high.
III. Switch Structure Combining Advantages of CICQ and Arbiter XB
FIG. 3 shows an N×N switch structure in which both the number of input ports and the number of output ports are N. Each vertical column (corresponding to one output port data channel) of the CICQ has N cross-point buffers in total, which are replaced by k FIFO buffers having a fixed number irrelevant to the number of the input ports (k is a natural number greater than or equal to 1). The k FIFO buffers are dynamically shared by N cross-points. Generally, k=4.
The structure, similar to ArbiterXB, uses a centralized arbiter to process a scheduling request of each line card. The arbitration algorithm of the structure is simpler than that of the conventional ArbiterXB. Each output port of the conventional ArbiterXB only can receive data of one input port each time, an average pass rate of one time of iteration is only about 60%, and 3-4 times of iteration are required to achieve a high pass rate. In the new structure, each output port can receive data of k input ports at the same time, and it can be calculated that the pass rate of one time of iteration is as high as 99.7% when k=4.
Meanwhile, since each output port can receive data of k input ports at the same time, the probability of collision and conflict between the input ports is greatly reduced, so the input ports do not need to keep strict synchronization in reception with each other to reduce the conflict probability. In this way, variable-length switching can be implemented easily.
Although the structure saves buffer resources, the centralized arbiter is still used, and the improvement of the performance of variable-length switching is still limited to a certain degree.
In view of the above, the problem of the existing structures for switching data lies in the difficulty of improving the performance of variable-length switching while saving buffer resources.